<!--<h1>Login to Book</h1>
<div class="login">
    <a class="fblogin" onclick="fblogin();" href="javascript:void();"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/frontend/images/fb_login_btn.png" /></a>
</div>
<script>
function fblogin(){
//     parent.parent.window.location='<?php // echo Yii::app()->createAbsoluteUrl('site/fblogin'); ?>';
     parent.parent.window.location='<?php // echo Yii::app()->createAbsoluteUrl('site/testlogin'); ?>';
     parent.$.fancybox.close();
}
</script>-->
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>-->

<style type="text/css">
    .box {
        margin: 5px;
        border: 1px solid #60729b;
        padding: 5px;
        width: 500px;
        height: 200px;
        overflow: auto;
        background-color: #e6ebf8;
    }
</style>
<script type="text/javascript">
    //            parent.parent.parent.$('#form-lang').html('<div class="abc" style="display: block; width: 100%; height: 100%;background: red;z-index:999999999999999999999999999">loasdh alsd  </div>');



    <?php if (isset(Yii::app()->session['LOGGED_USER'])):
        $user = Yii::app()->session['LOGGED_USER'];
        ?>
    //parent.$.fancybox.close();
    $logincontent = '<li class="username dropdown"><img src="https://graph.facebook.com/<?php echo $user->oauth_uid; ?>/picture?width=32&height=32"/><p class="dropdown-toggle" data-toggle="dropdown"><?php echo $user->first_name; ?><b class="caret fb-dropdown"></b></p><ul class="dropdown-menu"><li class="fb-logout" rel="en" href="javascript:void();"><a class="" href="<?php echo Yii::app()->createAbsoluteUrl('site/logout'); ?>">Logout</a></li></ul></li>';


    top.opener.document.getElementById('login-content').outerHTML = $logincontent;
    top.opener.reloadfancy();
    top.opener.document.getElementById('Modal-login').remove();
    window.close();
    //top.opener.location.reload();
    <?php endif; ?>

    //$(top.opener.document).find('#body').html('2332')
</script>

<script>
window.close();
top.opener.location.reload();
</script>